package com.un.sys.mapper;

/**
 * @Author xingjian
 * @Date 2023-02-20
 **/

import java.util.Arrays;
import java.util.Iterator;
import java.util.Random;
import java.util.Scanner;

/**
 * @Author: Guojiang
 * @Date: 2022/12/29/9:26
 * @Description:
 */
//把数组全部打印在一行
public class test {
    public static void main(String[] args) {
        int B=100;                  //题库
        int i=1;                     //计数器
        int[] A = new int[1000];   //记录
        Random r = new Random();
        int s=99;                   //未做题目id
        while (true){
            int number=r.nextInt(B)+1;//随机题目
            if (number==s){
                A[i]=number;
                i++;
                break;
            }else {
                A[i]=number;
                i++;
            }
        }
        System.out.println(i);
        System.out.println(Arrays.toString(A));

    }
    //NumberExit(A, number)
    public static boolean NumberExit(int[] array, int number) {
        for (int i = 0; i < array.length; i++)
            if (number == array[i])
                return true;
        return false;
    }
}
